/**
 * Created by imac13 on 18/12/23.
 */
import React, {Component} from 'react'
// import { CSSTransition } from 'react-transition-group'
import './style.css'
class Action extends Component {
    constructor (props) {
        super(props)
        this.state={
            show:true
        }
    }
    render () {
        return (
            <div className="box">
                <div className={this.state.show ? 'show' : 'hide'}>哈哈哈</div>
                <button onClick={this.toggleText.bind(this)}>toggle</button>
            </div>
        )
    }
    toggleText () {
        this.setState(()=> {
            return{
                show: this.state.show ? false :true
            }
        })
    }

}
export default Action